public class MathDivideSum {
    public static void main(String[] args) {
        double i = 0;
        double sum = 0;
        for(i = 1 ; i <= 100 ; i++) {
            if(i % 2 == 0) {
                sum = sum - 1/i;
            }
            if(i % 2 != 0) {
                sum = sum + 1/i;
            }
        }
        System.out.println(sum);
    }
}
